]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
panel-button: Set ':active' pseudo class when menu is open
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 8 Feb 2011 18:46:05 +0000 (19:46 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 9 Feb 2011 17:10:25 +0000 (18:10 +0100)
Commit c86a977564e5 removed :pressed from the list of styles which
highlight panel buttons, so the button highlight is now lost when
mousing over menu items. This is not the behavior we want, the
buttons should keep their highlight while being "active". Rather
than adding back the pseudo class to the CSS, let buttons use the
:active pseudo class when the menu is open, which makes more sense
than :pressed anyway.

js/ui/panelMenu.js

index 0b3ce939c9d433df390fd80de31084841c2facf4..6248264e333913ad01a53a51046e411bc8325b0f 100644 (file)
@@ -48,9 +48,9 @@ Button.prototype = {
 
     _onOpenStateChanged: function(menu, open) {
         if (open)
-            this.actor.add_style_pseudo_class('pressed');
+            this.actor.add_style_pseudo_class('active');
         else
-            this.actor.remove_style_pseudo_class('pressed');
+            this.actor.remove_style_pseudo_class('active');
     }
 };